package com.quanyan.pay.api.wechat.vo;

import com.quanyan.common.utils.StringUtil;
import com.quanyan.pay.enums.WxTradeTypeEnum;
import com.quanyan.pay.vo.WxBaseReqVo;
import com.thoughtworks.xstream.annotations.XStreamAlias;

import javax.validation.constraints.NotNull;

/**
 * Created by Zheng.Ke
 * Date 2017/2/15.
 * 具体参见文档https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_1
 */
@XStreamAlias("xml")
public class WxUnifiedOrderReqVo extends WxBaseReqVo {
    /** 应用APPID */
    @NotNull
    private String appid;
    /** 商户号 */
    @NotNull
    private String mch_id;
    /** 设备号 */
    private String device_info = "WEB";
    /** 签名类型 */
    private String sign_type = "MD5";
    /** 商品描述 */
    @NotNull
    private String body;
    /** 商品详情 */
    private String detail;
    /** attach */
    private String attach;
    /** 商户订单号 */
    @NotNull
    private String out_trade_no;
    /** 货币类型 */
    private String fee_type = "CNY";
    /** 总金额 单位为分*/
    @NotNull
    private Integer total_fee;
    /** 终端IP */
    @NotNull
    private String spbill_create_ip;
    /** 交易起始时间 */
    private String time_start;
    /** 交易结束时间 */
    private String time_expire;
    /** 商品标记 */
    private String goods_tag;
    /** 通知地址 */
    @NotNull
    private String notify_url;
    /** 交易类型 */
    @NotNull
    private WxTradeTypeEnum trade_type;
    /** 指定支付方式 */
    private String limit_pay;
    /** 用户标识 */
    private String openid;
    /** 随机字符串  */
    private String nonce_str = StringUtil.genRandomCode(32, false).toUpperCase();

    public String getNonce_str() {
        return nonce_str;
    }

    public void setNonce_str(String nonce_str) {
        this.nonce_str = nonce_str;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getMch_id() {
        return mch_id;
    }

    public void setMch_id(String mch_id) {
        this.mch_id = mch_id;
    }

    public String getDevice_info() {
        return device_info;
    }

    public void setDevice_info(String device_info) {
        this.device_info = device_info;
    }

    public String getSign_type() {
        return sign_type;
    }

    public void setSign_type(String sign_type) {
        this.sign_type = sign_type;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    public String getOut_trade_no() {
        return out_trade_no;
    }

    public void setOut_trade_no(String out_trade_no) {
        this.out_trade_no = out_trade_no;
    }

    public String getFee_type() {
        return fee_type;
    }

    public void setFee_type(String fee_type) {
        this.fee_type = fee_type;
    }

    public Integer getTotal_fee() {
        return total_fee;
    }

    public void setTotal_fee(Integer total_fee) {
        this.total_fee = total_fee;
    }

    public String getSpbill_create_ip() {
        return spbill_create_ip;
    }

    public void setSpbill_create_ip(String spbill_create_ip) {
        this.spbill_create_ip = spbill_create_ip;
    }

    public String getTime_start() {
        return time_start;
    }

    public void setTime_start(String time_start) {
        this.time_start = time_start;
    }

    public String getTime_expire() {
        return time_expire;
    }

    public void setTime_expire(String time_expire) {
        this.time_expire = time_expire;
    }

    public String getGoods_tag() {
        return goods_tag;
    }

    public void setGoods_tag(String goods_tag) {
        this.goods_tag = goods_tag;
    }

    public String getNotify_url() {
        return notify_url;
    }

    public void setNotify_url(String notify_url) {
        this.notify_url = notify_url;
    }

    public WxTradeTypeEnum getTrade_type() {
        return trade_type;
    }

    public void setTrade_type(WxTradeTypeEnum trade_type) {
        this.trade_type = trade_type;
    }

    public String getLimit_pay() {
        return limit_pay;
    }

    public void setLimit_pay(String limit_pay) {
        this.limit_pay = limit_pay;
    }
}
